﻿#ifndef U_UserPage_H
#define U_UserPage_H

#include "Window/mydialog.h"

class UserPage : public MyDialog
{
    Q_OBJECT
public:
    explicit UserPage(QWidget *parent = nullptr);

signals:

public slots:
    void OnBtnEditClicked();
    void OnBtnDelClicked();
    void OnTableDoubleClicked(int row, int column);

private:

    void InitWidget();
    void SetupConnections();
    void Initialize();
    void UpdateTable();

    QList<User> queryList;
    QTableWidget *tableWidget;

    QPushButton  *btnEdit;
    QPushButton  *btnDel;

    QLineEdit    *editCode;
    QLineEdit    *editPassword;
    QLineEdit    *editName;
    QComboBox    *editRole;

};

#endif // U_UserPage_H
